<?php

namespace App\Console;

use App\Console\Commands\CancelOrder;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * Define the application's command schedule.
     *
     * @param \Illuminate\Console\Scheduling\Schedule $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {

         $schedule->command('command:name')->daily();
         $schedule->command('order')->everyMinute();
         $schedule->command('Refund')->everyMinute();

       // $schedule->command('rabbitmq_consumer')->everyMinute();
       // $schedule->command('command:name')->daily();



        $schedule->command('rabbitmq_consumer')->everyMinute();
//        $schedule->command('command:name')->daily();
        // 超过三十分钟没付款取消单
        $schedule->command(CancelOrder::class)->everyMinute();

    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__ . '/Commands');

        require base_path('routes/console.php');
    }
}
